/*
 * @文件描述:
 * @版本:
 * @作者:周晨阳
 * @Date:2021-11-01 16:31:06
 */
#ifndef CONNECTION_H
#define CONNECTION_H

#include <QtCore>
#include <QThread>
#include <QDialog>
#include <QString>
#include "mainwindow.h"
enum CONNECT_STATE
{
    OK,
    DISCONNECT,
    CONNECTING
};

class Connection: public QObject
{
    Q_OBJECT
public:
    void init(MainWindow *window);
    CONNECT_STATE getConnecState(void);

private:
    void analysisString(QString string);

private slots:
    void acceptConnection();
    void readClient();
};

#endif
